namespace Microsoft.ServiceModel.Samples.Discovery.Protocol
{
    using System;
    using System.Xml;
    using System.Xml.Serialization;
    using System.Collections.Generic;

    
    [XmlType(Namespace = ProtocolStrings.Namespace)]
    [XmlRoot(ProtocolStrings.ProbeElement,
        Namespace = ProtocolStrings.Namespace)]
    public class Probe : MatchCriteria
    {
        public static Probe FromMatchCriteria(
            MatchCriteria matchCriteria)
        {
            if (matchCriteria == null)
                throw new ArgumentNullException("matchCriteria");

            Probe probe = new Probe();
            probe.Types = matchCriteria.Types;
            probe.Scopes = matchCriteria.Scopes;
            probe.AnyAttributes = matchCriteria.AnyAttributes;
            probe.AnyElements = matchCriteria.AnyElements;

            return probe;
        }
    }
}
